<%@ Control Language="C#" AutoEventWireup="true" Codebehind="ChatLogControl.ascx.cs"
    Inherits="ASP_TF2LogParser.UserControls.ChatLogControl" %>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
    <Columns>
        <asp:BoundField DataField="DateTime" HeaderText="Time" SortExpression="DateTime" />
        
        <asp:TemplateField HeaderText="Player" SortExpression="PlayerId">
            <ItemTemplate>
                <asp:Label runat="server" Text='<%# GenerateUrl( Eval("PlayerId").ToString(), Eval("TeamId").ToString() ) %>'
                    ID="ChatLabel"></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        
        <asp:BoundField DataField="ChatType" HeaderText="Type" SortExpression="ChatType" />
        <asp:BoundField DataField="Text" HeaderText="Said" SortExpression="Text" />
        
    </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetChatLog"
    TypeName="LogParser.DA.ChatLogModel">
    <SelectParameters>
        <asp:QueryStringParameter DefaultValue="-1" Name="logId" QueryStringField="logId"
            Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
